/* This file declares the functions used to manage delayed process in the OS */

#ifndef DELAY_H 
#define DELAY_H

#include "process_management.h"
#include "timer.h"

/* initializes delayed */
void initialize_delayed();

/* inserts pcb in the delayed array. */
uint32_t insert_delayed(PCB* pcb);

/* go through the delayed array, decrements the waiting times and wakes up the processes that are done waiting */
int32_t process_delayed();

/* removes the PCB pcb from the delayed list. Returns SUCCESS if success, FAILURE otherwise */
int32_t remove_delayed(PCB* pcb);

#endif
